import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import App from "./App.tsx";
import { BrowserRouter, Route, Routes } from "react-router";
import Inventory from "./pages/product-manager/inventory/Inventory.tsx";
import Warehouse from "./pages/product-manager/warehouse/Warehouse.tsx";
import InventoryCategory from "./pages/product-manager/category/Category.tsx";
import User from "./pages/user-manager/user/User.tsx";
import Role from "./pages/user-manager/role/Role.tsx";
import { Provider } from "react-redux";
import { store } from "./store";
import Account from "./pages/account/Account.tsx";
import Login from "./pages/login/Login.tsx";
import Dashboard from "./pages/dashboard/Dashboard.tsx";

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <Provider store={store}>
      <BrowserRouter>
        <Routes>
          <Route path="/" element={<App />}>
            <Route path="/dashboard" element={<Dashboard />} />
            <Route path="/user" element={<User />} />
            <Route path="/role" element={<Role />} />
            <Route path="/warehouse" element={<Warehouse />} />
            <Route path="/inventory" element={<Inventory />} />
            <Route path="/category" element={<InventoryCategory />} />
            <Route path="/account" element={<Account />} />
            <Route path="/login" element={<Login />} />
          </Route>
        </Routes>
      </BrowserRouter>
    </Provider>
  </StrictMode>,
);
